﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Pg.BioMedics.SDR.Entities;

namespace Pg.BioMedics.SDR.Services.Algorithms
{
    /// <summary>
    /// Represents terms weighting loginc in case of SDR
    /// </summary>
    public interface IWeightingAlgorithm
    {
        /// <summary>
        /// Calculates Q weight for the term t value within the query Q
        /// tokens set.
        /// </summary>
        /// <param name="t">Token</param>
        /// <param name="Q">List of tokens in the query</param>
        /// <returns>Weighting value</returns>
        double CalculateQWeight(Token t, Token[] Q);

        /// <summary>
        /// Calculates D weight value for token t the document D
        /// </summary>
        /// <param name="t">Token term</param>
        /// <param name="D">Document tokens</param>
        /// <returns>Weighting value</returns>
        double CalculateDWeight(Token t, Token[] D);
    }
}
